import { post, get, put } from "@/utils/request";

const modules = {
  // 新增车辆
  addCar: (data) => post("/user/car/add", data),

  //用户车辆列表
  getCarList: (params) => get("/user/car/page", params),

  //更新车辆信息
  updateCarInfo: (data) => post("/user/car/update", data),

  //删除车辆信息
  delCarInfo: (data) => post("/user/car/delete", data),

  //新增收货地址
  addAddress: (data) => post("/memberAddress/add", data),

  //收货地址列表
  getAddresslist: () => get("/memberAddress/list"),

  //收货地址详情
  getAddressDetail: (id) => get(`/memberAddress/detail/${id}`),

  //编辑收货地址
  editAddress: (data) => put("/carMall/tbReceiverInfo/update", data),

  //设置默认地址
  setDefaultAddress: (id) => put(`/carMall/tbReceiverInfo/setDefault/${id}`),
};
export default modules;
